<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 17/12/25
 * Time: 14:36
 */

Yaf_Loader::import(EXTEND_PATH.'/qsms/SenderUtil.php');
Yaf_Loader::import(EXTEND_PATH.'/qsms/MultiSender.php');
Yaf_Loader::import(EXTEND_PATH.'/qsms/SingleSender.php');
Yaf_Loader::import(EXTEND_PATH.'/qsms/StatusPuller.php');
Yaf_Loader::import(EXTEND_PATH.'/qsms/VoicePromptSender.php');
Yaf_Loader::import(EXTEND_PATH.'/qsms/VoiceVerifyCodeSender.php');

//https://github.com/qcloudsms/qcloudsms_php

class Sms
{
    private $appid = '1400043256';
    private $appkey = '26ef46998bdda4d2c0dd020d9ca3a733';

    //群发短信类
    public function multiSender($phone,$msg)
    {
        $multiSender = new MultiSender($this->appid,$this->appkey);
        $send = $multiSender->send(0,86,$phone,$msg);
        return $send;
    }

    //单发短信类
    public function singleSender($phone,$msg)
    {
        $singleSender = new SingleSender($this->appid,$this->appkey);
        $send = $singleSender->send(0,86,$phone,$msg);
        return $send;
    }

    //拉取短信状态类
    public function statusPuller()
    {
        $statusPuller = new StatusPuller($this->appid,$this->appkey);
    }

    //发送语音通知类
    public function voicePromptSender()
    {
        $voicePromptSender = new VoicePromptSender($this->appid,$this->appkey);
    }

    //发送语音验证码类
    public function voiceVerifyCodeSender()
    {
        $voiceVerifyCodeSender = new VoiceVerifyCodeSender($this->appid,$this->appkey);
    }

}